<template>
	<view class="pg-30">
		<view class="font-30">输入收款金额</view>
		<view class="d-flex-yCenter border-b py-20">
			<text class="text">￥</text>
			<input type="number" v-model="money" placeholder="请输入收款金额" placeholder-style="font-size:28rpx;"/>
		</view>
		<view class="btn" @tap='submit'>确认收款</view>
	</view>
</template>

<script>
	import {http_user_smoke_order_create} from '@/config/apiRouter.js'
	export default {
		data() {
			return {
				scene:'',
				money:''
			}
		},
		onLoad(opens) {
			console.log(opens);
			this.scene=opens.scene
		},	
		methods: {
			submit(){
				if(!this.userMD.getToken(true))return
				if(this.money==''){
					this.$tool.showToast('请输入收款金额')
					return
				}
				http_user_smoke_order_create({
					data:{
						money:this.money,
						id:this.scene
					}
				}).then(res=>{
					this.$tool.showToast('收款成功',true)
					setTimeout(()=>{
						this.$tool.navigateBack()
					},800)
				})
			}
		}
	}
</script>

<style>
	.text{
		font-size: 60rpx;
	}
input{
	height: 90%;
	font-size: 60rpx;
}
.btn{
	width: 690rpx;
	line-height: 80rpx;
	background: #FF890B;
	border-radius: 40rpx;
	color: #fff;
	text-align: center;
	margin: 100rpx auto;
}
</style>
